<template>
  <h2>props</h2>
  <child name="zhangsan" @getage="fn"></child>
</template>

<script>
import Child from "./07-propschild.vue";
export default {
  setup() {
    const fn = () => {
      console.log("getage");
    };

    return {
      fn,
    };
  },
  // 注册组件只能写在setup的外面
  components: {
    Child,
  },
};
</script>
